package com.xnx3.wangmarket.plugin.innerAccount.generateCache;

import java.util.List;

import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import com.xnx3.j2ee.generateCache.BaseGenerate;
import com.xnx3.j2ee.service.SqlService;

/**
 * 信息相关数据缓存生成
 * @author 管雷鸣
 *
 */
@Component
public class Department extends BaseGenerate {
	@Resource
	private SqlService sqlService;

	
	/**
	 * 生成部门列表缓存
	 * @param list
	 */
	public void departmentList(List<com.xnx3.wangmarket.plugin.innerAccount.entity.Department> list){
		createCacheObject("departmentList");
		for (int i = 0; i < list.size(); i++) {
			com.xnx3.wangmarket.plugin.innerAccount.entity.Department department = list.get(i);
			cacheAdd(department.getId(), department.getName());
		}
		
		generateCacheFile();
	}

}
